package com.zxw.user.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zxw.common.core.base.res.BasePageRes;
import com.zxw.common.core.base.res.BaseRes;
import com.zxw.user.domain.dto.LoginUserDTO;
import com.zxw.user.domain.dto.UserDTO;
import com.zxw.user.domain.dto.UserUpdateDTO;
import com.zxw.user.domain.entity.User;
import com.zxw.user.domain.vo.*;
import org.springframework.web.bind.annotation.*;

public interface UserAPI {

    @GetMapping("/login-user-Info")
    BaseRes<LoginUserDTO> getLoginUserInfo();

    @GetMapping("/user-list")
    BasePageRes<UserDTO> findUserList(UserPageVO userPageVO);


    @GetMapping("/user/{userId}")
    BaseRes<UserUpdateDTO> findUserById(@PathVariable Long userId);

    @PostMapping("/insert")
    BaseRes<User> insertUser(@RequestBody UserAddVO userAddVO);

    @PutMapping("/update/{userId}")
    BaseRes updateUser(@PathVariable("userId") Long userId, @RequestBody UserUpdateVO userAddVO);

    @DeleteMapping("/{userIds}")
    BaseRes deleteUser(@PathVariable("userIds") String userIds);

    @PutMapping("/update/part/{userId}")
    BaseRes updatePart(@PathVariable("userId") Long userId, @RequestBody User user);

    @PostMapping("/register/from/flow")
    BaseRes registerFromFlow(@RequestBody RegisterUserVO user);

}
